package com.evil.log.pojo.entiy;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 操作日志表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@TableName(value = "evil_operation_log")
public class OperationLog implements Serializable {

    /**
     * id
     */
    @TableId(value = "operation_log_id", type = IdType.AUTO)
    private Long operationLogId;

    /**
     * 请求日志id
     */
    @TableField(value = "request_log_id")
    private Long requestLogId;

    /**
     * 操作日志模块
     */
    @TableField(value = "log_type")
    private Integer logType;

    /**
     * 日志内容
     */
    @TableField(value = "log_content")
    private String logContent;

    /**
     * 操作对象id
     */
    @TableField(value = "content_id")
    private String contentId;

    /**
     * 操作行为:insert,update,delete
     */
    @TableField(value = "`type`")
    private String type;

    /**
     * 操作时间
     */
    @TableField(value = "`time`")
    private Date time;

    /**
     * 创建人
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 创建人名字
     */
    @TableField(value = "creator_name")
    private String creatorName;

    /**
     * 创建时间
     */
    @TableField(value = "created")
    private Date created;

    private static final long serialVersionUID = 1L;

    public static final String COL_OPERATION_LOG_ID = "operation_log_id";

    public static final String COL_REQUEST_LOG_ID = "request_log_id";

    public static final String COL_LOG_TYPE = "log_type";

    public static final String COL_LOG_CONTENT = "log_content";

    public static final String COL_CONTENT_ID = "content_id";

    public static final String COL_TYPE = "type";

    public static final String COL_TIME = "time";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR_NAME = "creator_name";

    public static final String COL_CREATED = "created";
}